<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

	<ui:composition 
	  xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      template="/view/templates/templateLayout.xhtml">
      
      <ui:define name="conteudo">    
      <link rel="stylesheet" type="text/css" href="./estilos.css"/>   	
  	
<h:form id="formExcluirFornecedor" prependId="false">  
	<p:panel id="panelExcluirFornecedor" style="margin-bottom:20px; ">  
		<f:facet name="header">
		<h:outputText value="Excluir Fornecedor" styleClass="outputTextTitulo"/>
	</f:facet>
 	<p:messages id="messagesExcluirFornecedor" autoUpdate="true" closable="true" showDetail="true"/> 
    	<h:panelGrid  columns="3" style="margin-top:20px; margin-right:10%;">  
            <h:outputLabel value="Código" styleClass="outputLabel"/>  
            <h:outputLabel value="Razão Social*" styleClass="outputLabel"/>  
            <h:outputLabel value="Nome Fantasia*" styleClass="outputLabel"/>             
            <p:inputText value="#{fornecedorBean.fornecedor.idFornecedor}" styleClass="inputId" disabled="true" maxlength="10"/>  
  			<p:inputText value="#{fornecedorBean.fornecedor.razaoSocial}" maxlength="40"
  							styleClass="inputDescricao" disabled="true"/>  
  			<p:inputText value="#{fornecedorBean.fornecedor.nomeFantasia}" styleClass="inputDescricao" disabled="true"/>
        </h:panelGrid> 
         
        <h:panelGrid  columns="3" style="margin-right:10%;">  
            <h:outputLabel value="CNPJ*" styleClass="outputLabel"/>  
            <h:outputLabel value="Incrição Estadual" styleClass="outputLabel"/>             
            <h:outputLabel value="Incrição Municipal" styleClass="outputLabel"/>  
            <p:inputMask mask="99.999.999/9999-99" value="#{fornecedorBean.fornecedor.cnpj}" styleClass="inputDescricao" style="width:120px"
            			 disabled="true" />  
  			<p:inputText value="#{fornecedorBean.fornecedor.inscricaoEstadual}" styleClass="inputDescricao" style="width:120px" maxlength="20" disabled="true"/>  
  			<p:inputText value="#{fornecedorBean.fornecedor.inscricaoMunicipal}" styleClass="inputDescricao" style="width:120px" maxlength="20" disabled="true"/>  
        </h:panelGrid>  
        <h:panelGrid  columns="3" style="margin-right:10%;">  
            <h:outputLabel value="Logradouro*" styleClass="outputLabel"/>  
            <h:outputLabel value="Número*" styleClass="outputLabel"/>             
            <h:outputLabel value="Complemento" styleClass="outputLabel"/>  
            <p:inputText value="#{fornecedorBean.fornecedor.logradouro}" styleClass="inputDescricao" maxlength="40" disabled="true"/>  
  			<p:inputText value="#{fornecedorBean.fornecedor.numero}" styleClass="inputId" maxlength="10" disabled="true"/>  
  			<p:inputText value="#{fornecedorBean.fornecedor.complemento}" styleClass="inputDescricao" maxlength="40" disabled="true"/>  
        </h:panelGrid> 
        <h:panelGrid id="pgCidadeFornecedor" columns="4" style="margin-right:10%;">  
            <h:outputLabel value="Código*" styleClass="outputLabel"/>  
            <h:outputLabel value="Cidade*" styleClass="outputLabel"/>
            <h:outputLabel value="Estado" styleClass="outputLabel"/>             
            <h:outputLabel value="País" styleClass="outputLabel"/>             
            <p:inputText value="#{fornecedorBean.fornecedor.cidade.idCidade}" styleClass="inputId" disabled="true"/> 
  			<p:inputText value="#{fornecedorBean.fornecedor.cidade.descricao}" styleClass="inputDescricao" disabled="true" />  			
  			<p:inputText value="#{fornecedorBean.fornecedor.cidade.estado.sigla}"  styleClass="inputId" disabled="true"/>
  			<p:inputText value="#{fornecedorBean.fornecedor.cidade.estado.pais.descricao}" styleClass="inputDescricao" disabled="true"/>
        </h:panelGrid> 

        <h:panelGrid columns="1" style="margin-right:10%;"> 
         	<h:outputLabel value="Telefones para Contato" styleClass="outputLabel"/>      
		</h:panelGrid> 

        <h:panelGrid columns="3" style="margin-right:10%;">             
            <h:outputLabel value="Telefone" styleClass="outputLabel"/>      
            <h:outputLabel value="Celular" styleClass="outputLabel"/>  
            <h:outputLabel value="Comercial" styleClass="outputLabel"/>   
            
  			<p:inputMask value="#{fornecedorBean.fornecedor.telefone}" mask="+99 (99) 9999-9999" styleClass="inputTelefone" disabled="true"/>  
  			<p:inputMask value="#{fornecedorBean.fornecedor.celular}" mask="+99 (99) 9999-9999" styleClass="inputTelefone" disabled="true"/> 
  			<p:inputMask value="#{fornecedorBean.fornecedor.fax}" mask="+99 (99) 9999-9999" styleClass="inputTelefone" disabled="true"/> 
        </h:panelGrid> 
       	<h:panelGrid columns="1" style="margin-right:10%;"> 
         	<h:outputLabel value="Nome do Contato" styleClass="outputLabel"/>  
         	<p:inputText value="#{fornecedorBean.fornecedor.nomeContato}" styleClass="inputDescricao" disabled="true"/>     
		</h:panelGrid> 
        <h:panelGrid  columns="2" style="margin-right:10%;">  
            <h:outputLabel value="E-mail" styleClass="outputLabel"/> 
            <h:outputLabel value="Site" styleClass="outputLabel"/>             
  			<p:inputText value="#{fornecedorBean.fornecedor.email}" styleClass="inputDescricao" disabled="true"/>  			
  			<p:inputText value="#{fornecedorBean.fornecedor.site}" styleClass="inputDescricao" disabled="true"/>   
        </h:panelGrid> 
        
        <h:panelGrid  columns="1" style="margin-right:10%;">  
            <h:outputLabel value="Observação" styleClass="outputLabel"/>       
  			<p:inputTextarea value="#{fornecedorBean.fornecedor.observacao}" rows="3" cols="100" style="font-size:12px;" disabled="true"/>  
        </h:panelGrid> 
    </p:panel>  
    <p:commandButton value="Excluir"  onclick="confirmation.show()" type="button" styleClass="commandButton" />  
	<p:commandButton value="Voltar" action="#{fornecedorBean.consultarFornecedor}" immediate="true" style="margin-right:20px;" /> 
</h:form> 
    <p:confirmDialog id="confirmDialog" message="Excluir Fornecedor?"  
                header="Confirmar exclusão" widgetVar="confirmation" appendToBody="true" >  
                  
        <p:commandButton id="confirm" value="Sim" oncomplete="confirmation.hide()" process="@this" 
                    action="#{fornecedorBean.deleteFornecedor}" />  
        <p:commandButton id="decline" value="Não" onclick="confirmation.hide()" type="button" />   
                  
    </p:confirmDialog>

</ui:define>
</ui:composition>
